package cn.edu.scau.cmi.zenghanxiong.compsite.consistent;

public abstract class ConsistentComponent {
	private String name;
    private ConsistentComponent parent;

    public ConsistentComponent(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ConsistentComponent getParent() {
        return this.parent;
    }

    public void setParent(ConsistentComponent parent) {
        this.parent = parent;
    }
    
    public String toString() {
        return this.name;
    }
    protected abstract void addChild(ConsistentComponent child);

    protected abstract void removeChild(ConsistentComponent child);
}
